<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "j_line_goods_sync".
 *
 * @property integer $id
 * @property string $sku
 * @property string $goods_name_cn
 * @property string $country_name
 * @property string $brand_name
 * @property string $unit
 * @property string $sale_price
 * @property string $market_price
 * @property integer $category
 * @property string $spec_val
 * @property string $spec_color_val
 * @property string $creator
 * @property string $create_time
 * @property string $editor
 * @property string $editor_time
 */
class LineGoodsSync extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'j_line_goods_sync';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sku', 'goods_name_cn', 'brand_name', 'unit', 'genre_type', 'spec_val', 'spec_color_val', 'creator', 'create_time', 'editor', 'editor_time'], 'required'],
            [['sale_price', 'market_price'], 'number'],
            [['genre_type'], 'integer'],
            [['create_time', 'editor_time'], 'safe'],
            [['sku', 'goods_name_cn', 'country_name', 'brand_name', 'spec_val', 'spec_color_val'], 'string', 'max' => 100],
            [['unit'], 'string', 'max' => 20],
            [['creator', 'editor'], 'string', 'max' => 60],
            [['sku'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '线下商品同步表_id',
            'sku' => '物料号',
            'goods_name_cn' => '商品名称',
            'country_name' => '国家名称',
            'brand_name' => '品牌名称',
            'unit' => '价格单位',
            'sale_price' => '销售价',
            'market_price' => '市场价',
            'genre_type' => '大类(涉及权限的大类)',
            'spec_val' => '规格名称',
            'spec_color_val' => '色号名称',
            'creator' => '创建者',
            'create_time' => '创建时间',
            'editor' => '更新者',
            'editor_time' => '更新时间',
        ];
    }


}
